cmake_minimum_required(VERSION 3.0.0)
project(hello VERSION 0.1.0 LANGUAGES C)

include(CTest)
enable_testing()

add_executable(hello main.c file.c)
add_executable(voltage voltage.c file.c)
add_executable(fan fan.c file.c)
add_executable(sensor sensor.c file.c)
add_executable(illum illum.c file.c)
add_executable(beeper beeper.c)
add_executable(key key.c)
target_link_libraries(key gpiod)
add_executable(client client.c)
target_link_libraries(client mosquitto)
add_executable(json json.c)
target_link_libraries(json cjson)
add_executable(yyz yyz.c file.c)
target_link_libraries(yyz cjson mosquitto)

add_executable(yyz_lamp yyz_lamp.c file.c)
target_link_libraries(yyz_lamp cjson mosquitto)

set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
